package com.ruoyi.restaurant.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

public class RestOrdersDTO {
    private static final long serialVersionUID = 1L;

    /** 订单唯一标识 */
    private Long orderId;

    /** 菜品ID，与dishes表逻辑关联 */
    @Excel(name = "菜品ID，与dishes表逻辑关联")
    private Long dishId;

    @Excel(name = "菜品名称")
    private String dishName;

    /** 菜品数量 */
    @Excel(name = "菜品数量")
    private Long quantity;

    /** 订单总价格 */
    @Excel(name = "订单总价格")
    private BigDecimal totalPrice;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderTime;

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }
    public void setDishId(Long dishId)
    {
        this.dishId = dishId;
    }

    public Long getDishId()
    {
        return dishId;
    }
    public void setQuantity(Long quantity)
    {
        this.quantity = quantity;
    }

    public String getDishName() {
        return dishName;
    }

    public void setDishName(String dishName) {
        this.dishName = dishName;
    }

    public Long getQuantity()
    {
        return quantity;
    }
    public void setTotalPrice(BigDecimal totalPrice)
    {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPrice()
    {
        return totalPrice;
    }
    public void setOrderTime(Date orderTime)
    {
        this.orderTime = orderTime;
    }

    public Date getOrderTime()
    {
        return orderTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("orderId", getOrderId())
                .append("dishId", getDishId())
                .append("dishName", getDishName())
                .append("quantity", getQuantity())
                .append("totalPrice", getTotalPrice())
                .append("orderTime", getOrderTime())
                .toString();
    }
}
